import { http } from '@/utils/http.js'

// 问诊记录-订单列表-找医生、极速问诊、开药问诊
export const getPatientConsultOrderListApi = (data, isShowLoading = true) => {
  return http.request({
    method: 'GET',
    url: '/patient/consult/order/list',
    params: data,
    custom: {
      loading: isShowLoading,
    },
  })
}

// 问诊-查询订单详情信息-找医生、极速问诊和开药问诊
export const patientConsultOrderDetailApi = (orderId) => {
  return http.request({
    method: 'get',
    url: '/patient/consult/order/detail',
    params: { orderId },
  })
}

// 问诊-订单-评价医生
export const patientOrderEvaluateApi = (data) => {
  return http.request({
    method: 'POST',
    url: '/patient/order/evaluate',
    data,
  })
}

// 问诊-保存/修改问诊订单
export const patientConsultOrderApi = (data) => {
  return http.request({
    method: 'POST',
    url: '/patient/consult/order',
    data,
  })
}

// 预支付，问诊-支付页面-计算就诊信息和抵扣信息
export const patientConsultOrderPreApi = (data) => {
  return http.request({
    method: 'GET',
    url: '/patient/consult/order/pre',
    params: data,
  })
}

// 查询所有科室-层级
export const depAllApi = () => {
  return http.request({
    method: 'GET',
    url: '/dep/all',
  })
}
